﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ExportToRTR.CApExportToRTRVisual
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll


namespace DnProcessSimulateCommands.ExportToRTR{

public class CApExportToRTRVisual : ICApExportToRTRWriteable
{
  private string m_name;
  private CApExportToRTROrigin m_origin;
  private CApExportToRTRGeometry m_geometry;
  private CApExportToRTRMaterial m_material;

  public CApExportToRTRVisual(
    CApExportToRTRGeometry geometry,
    string name = null,
    CApExportToRTROrigin origin = null,
    CApExportToRTRMaterial material = null)
  {
    this.m_name = name;
    this.m_origin = origin;
    this.m_geometry = geometry;
    this.m_material = material;
  }

  public CApExportToRTRGeometry Geometry
  {
    get => this.m_geometry;
    set => this.m_geometry = value;
  }

  public void Write(CApExportToRTRXmlWriter writer)
  {
    writer.WriteStartElement("visual");
    if (this.m_name != null)
      writer.WriteAttributeString("name", this.m_name);
    this.m_origin?.Write(writer);
    this.m_geometry?.Write(writer);
    this.m_material?.Write(writer);
    writer.WriteEndElement();
  }
}
